<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mint='mint.dtd'>
  <xsl:output method='xml' version='1.0' encoding='UTF-8' indent='yes'/>
  <xsl:template match="/">
    <xsl:variable name='baseuri' select='string(/*/baseuri)' />
    <html xmlns='http://www.w3.org/1999/xhtml'>
      <head><title><xsl:value-of select='/*/title'/></title></head>
      <body>
        <div class='nav'>
          <xsl:for-each select="/*/nav/row">
            <div>
              <a href='{$baseuri}{page}'><xsl:value-of select='text' /></a>
            </div>
          </xsl:for-each>
        </div>
        <table class='content'>
          <tr>
            <th>Name</th>
            <th>Contact</th>
            <th>Phone</th>
            <th></th>
          </tr>
          <xsl:for-each select="/*/clients/row">
            <tr>
              <td>
                <a href='{$baseuri}clients/show/{id}'><xsl:value-of select='name' /></a>
              </td>
              <td><xsl:value-of select='contact' /></td>
              <td><xsl:value-of select='phone' /></td>
              <td>
                [
                <a href='{$baseuri}clients/edit/{id}'>edit</a>
                |
                <a href='{$baseuri}clients/delete/{id}'>delete</a>
                ]
              </td>
            </tr>
          </xsl:for-each>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
